package pokpok.action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class Login extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private boolean error;
	private String login;

	public String valider() {
		if (login.equals("tropzguin")) {
			ActionContext.getContext().getSession().put("login", true);
			return SUCCESS;
		} else {
			error = true;
			return ERROR;
		}
	}

	public boolean isError() {
		return error;
	}

	public void setError(boolean error) {
		this.error = error;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}
}
